package 泛型;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * @author Administrator
 * @ClassName Test
 * @TIME 星期二 2020/12/29
 */
public class Test {
    public static void main(String[] args) {
        Collection<Student> c = new ArrayList<>();
        c.add(new Student("Zs",23));
        c.add(new Student("LS",43));
        for (Student s : c) {
            System.out.println(s.getAge() + "," + s.getName());
        }
    }
}
